<?php
namespace Home\Model;
use Think\Model;
class UserModel extends Model {

	protected $trueTableName = 'my_user'; 

	/**
	 * 根据用户 ID 获取 用户信息
	 */
	public function getUserById($userid = '', $field = '')
	{
		$where['id'] = $userid;
		$field = $field;
		return $this->where($where)->field($field)->find();
	}
}